#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative '../lib/shell'
require_relative '../lib/git'
require_relative '../lib/packages'

packages.install 'python2'

git 'https://github.com/petronny/pinyin-completion.git', '~/.config/pinyin-completion'
Dir.chdir(shell.expand('~/.config/pinyin-completion')) do
  shell.exe 'sudo ./setup.py install'
end

shell.rc_append('source ~/.config/pinyin-completion/shell/pinyin-comp.zsh')
